package org.dtree.ow.models;

import org.dtree.ow.base.model.BaseModel;
import org.nutz.dao.entity.annotation.*;

import java.util.List;

/**
 * Created by dengwubo on 2017/9/19.
 */
@Table("dt_ow_case_type")
@Comment("案例类型关联表")
public class CaseType extends BaseModel {

    @Name
    @Comment
    @Column("id")
    @ColDefine(type = ColType.VARCHAR, width = 32)
    private String id;

    @Comment
    @Column("name")
    @ColDefine(type = ColType.VARCHAR, width = 32)
    private String name;

    @Comment
    @Column("description")
    @ColDefine(type = ColType.VARCHAR, width = 225)
    private String description;

    // 配置类型与案例的一对多关联关系
    @Many(field = "caseTypeId")
    private List<Case> cases;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public List<Case> getCases() {
        return cases;
    }

    public void setCases(List<Case> cases) {
        this.cases = cases;
    }
}
